<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Test_Of_Csv_Writer</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Test_Of_Csv_Writer</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Csv Writer unit tests</p>
		<p class="notes">
			Located in <a class="field" href="_tests---TestCases---Writer.php.html">/tests/TestCases/Writer.php</a> (line <span class="field">11</span>)
		</p>
		
				
		<pre>UnitTestCase
   |
   --Test_Of_Csv_Writer</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																				
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setUp" title="details" class="method-name">setUp</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#tearDown" title="details" class="method-name">tearDown</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Can_Change_delimiter" title="details" class="method-name">test_Can_Change_delimiter</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Accepts_Custom_Dialect" title="details" class="method-name">test_Csv_Writer_Accepts_Custom_Dialect</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Accepts_Filename_In_Constructor" title="details" class="method-name">test_Csv_Writer_Accepts_Filename_In_Constructor</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Constructor_Creates_File_If_Nonexistant" title="details" class="method-name">test_Csv_Writer_Constructor_Creates_File_If_Nonexistant</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed" title="details" class="method-name">test_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Throws_Exception_If_Cant_Write" title="details" class="method-name">test_Csv_Writer_Throws_Exception_If_Cant_Write</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Uses_Default_Dialect" title="details" class="method-name">test_Csv_Writer_Uses_Default_Dialect</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Writes_Row" title="details" class="method-name">test_Csv_Writer_Writes_Row</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Csv_Writer_Writes_Row_When_Destroyed" title="details" class="method-name">test_Csv_Writer_Writes_Row_When_Destroyed</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Dialect_Quote_All" title="details" class="method-name">test_Dialect_Quote_All</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Dialect_Quote_Minimum" title="details" class="method-name">test_Dialect_Quote_Minimum</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Dialect_Quote_None" title="details" class="method-name">test_Dialect_Quote_None</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Dialect_Quote_Nonnumeric" title="details" class="method-name">test_Dialect_Quote_Nonnumeric</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Writer_Accepts_Array" title="details" class="method-name">test_Writer_Accepts_Array</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Writer_Accepts_Handle" title="details" class="method-name">test_Writer_Accepts_Handle</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#test_Writer_WriteRows_Accepts_Reader" title="details" class="method-name">test_Writer_WriteRows_Accepts_Reader</a>
										()
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setUp</span> (line <span class="line-number">13</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setUp
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtearDown" id="tearDown"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">tearDown</span> (line <span class="line-number">52</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			tearDown
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Can_Change_delimiter" id="test_Can_Change_delimiter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Can_Change_delimiter</span> (line <span class="line-number">147</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Can_Change_delimiter
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Accepts_Custom_Dialect" id="test_Csv_Writer_Accepts_Custom_Dialect"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Accepts_Custom_Dialect</span> (line <span class="line-number">82</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Csv_Writer should also be able to accept a csv dialect in its constructor or by setDialect()</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Accepts_Custom_Dialect
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Accepts_Filename_In_Constructor" id="test_Csv_Writer_Accepts_Filename_In_Constructor"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Accepts_Filename_In_Constructor</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writer should create the file if it doesnt exist</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Accepts_Filename_In_Constructor
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Constructor_Creates_File_If_Nonexistant" id="test_Csv_Writer_Constructor_Creates_File_If_Nonexistant"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Constructor_Creates_File_If_Nonexistant</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writer should create the file if it doesnt exist (the close method will write changes to the db)</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Constructor_Creates_File_If_Nonexistant
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed" id="test_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed</span> (line <span class="line-number">137</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Does_Not_Throw_Exception_If_Closed_Then_Destroyed
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Throws_Exception_If_Cant_Write" id="test_Csv_Writer_Throws_Exception_If_Cant_Write"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Throws_Exception_If_Cant_Write</span> (line <span class="line-number">105</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">An exception should be thrown if there is an error writing to the csv file</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Throws_Exception_If_Cant_Write
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Uses_Default_Dialect" id="test_Csv_Writer_Uses_Default_Dialect"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Uses_Default_Dialect</span> (line <span class="line-number">72</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writer should create the file if it doesnt exist</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Uses_Default_Dialect
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Writes_Row" id="test_Csv_Writer_Writes_Row"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Writes_Row</span> (line <span class="line-number">116</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test that writeRow writes one row to the file</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Writes_Row
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Csv_Writer_Writes_Row_When_Destroyed" id="test_Csv_Writer_Writes_Row_When_Destroyed"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Csv_Writer_Writes_Row_When_Destroyed</span> (line <span class="line-number">128</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test that all pending changes are written to the file when the object is destroyed</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Csv_Writer_Writes_Row_When_Destroyed
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Dialect_Quote_All" id="test_Dialect_Quote_All"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Dialect_Quote_All</span> (line <span class="line-number">173</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Dialect_Quote_All
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Dialect_Quote_Minimum" id="test_Dialect_Quote_Minimum"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Dialect_Quote_Minimum</span> (line <span class="line-number">185</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Dialect_Quote_Minimum
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Dialect_Quote_None" id="test_Dialect_Quote_None"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Dialect_Quote_None</span> (line <span class="line-number">160</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test that dialects work correctly with quoting and escaping things</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Dialect_Quote_None
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Dialect_Quote_Nonnumeric" id="test_Dialect_Quote_Nonnumeric"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Dialect_Quote_Nonnumeric</span> (line <span class="line-number">210</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Dialect_Quote_Nonnumeric
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Writer_Accepts_Array" id="test_Writer_Accepts_Array"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Writer_Accepts_Array</span> (line <span class="line-number">222</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test that writer accepts a multi-dimensional array of rows to write to disk</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Writer_Accepts_Array
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Writer_Accepts_Handle" id="test_Writer_Accepts_Handle"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">test_Writer_Accepts_Handle</span> (line <span class="line-number">256</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">todo:</span> When appending a file, there should be a way to detect if you need to prepend a newline char        maybe check to see if the last char in the file is a newline char and if not, prepend one?</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Writer_Accepts_Handle
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtest_Writer_WriteRows_Accepts_Reader" id="test_Writer_WriteRows_Accepts_Reader"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">test_Writer_WriteRows_Accepts_Reader</span> (line <span class="line-number">239</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test that writer accepts a reader object to read from instead of an array</p>
	<ul class="tags">
				<li><span class="field">todo:</span> For some reason not having a line-ending char causes the reader to not read the last line - find out why</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			test_Writer_WriteRows_Accepts_Reader
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 19 Feb 2008 21:05:34 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>